When an operating system executes an application, the application will make function calls to functions that are provided by a function library. An application is a computer program that is compiled and linked to execute under a particular operating system (OS). The OS is software that starts up a computer or other data processing system and manages the functions and/or resources of the computer or other data processing system. A function library is a collection of functions that provides services to the application. Libraries can be statically linked or dynamically linked at runtime. A statically linked library is linked at compile time and is part of the application. A dynamically linked library is loaded into or used by the application when the application is executing. Examples of dynamically linked libraries are runtime libraries, Dynamic-Link Libraries (DLL), and operating system (OS) services. Runtime libraries, DLL, and OS services are collectively referred to herein as systems libraries. In one embodiment, a runtime library is a computer program library used by a compiler to implement functions built into a programming language during execution of an application. A DLL is a function library that is loaded into the application at runtime. DLL functions can be operating system specific, application specific, etc. In one embodiment, OS services are services used by an application during runtime and are specific to a particular OS. OS services can be services to manage system resources such as memory, filesystem resources, power states, graphical user interfaces, other resources, perform inter-application communications, etc.
FIG. 1 (prior art) is a block diagram of an application 102 executing in an operating system environment. In FIG. 1, application 102 executes in OS environment 100 using runtime library 104, OS services 106, and/or DLL 108. In FIG. 1, application 102 was specifically generated to execute in OS environment 100. Nonetheless, this application can be run in different OS environments. FIG. 2 (prior art) is a block diagram of an application 202 executing in one operating system environment 210 (OS2), which is also executing in another operating system environment 200 (OS1). OS2 may be a different operating system from a different vendor than OS1. Alternatively, OS2 maybe a different version of OS1. In FIG. 2, OS2-based application 202 runs in OS1 environment 200 by using OS2 service environment 210. In one embodiment, OS2 service environment 210 is an actual version of the OS2 executing as a virtual machine in the OS1 Environment 200. Examples of this embodiment known in the art are VMWARE, PARALLELS, and VIRTUALPC. In this embodiment, OS2 application 202 runs in operating system OS2 using OS2 services, DLLs, and/or runtime libraries 208.
Alternatively, OS2 service environment 210 provides a set of application programming interfaces (APIs) for application 202 without the need for a version of OS2 executing in the OS2 service environment. In this embodiment, OS2 service environment 210 loads and executes an OS2-based application using OS2 library 206 in the OS1 environment. The phrase “OS2-based application” means that this application is compiled for and intended to execute under the OS2 operating system. In addition, OS2 service environment 210 can also use OS2 libraries 208, such as OS2 services, DLLs, and/or runtime libraries. An example of this embodiment known in the art is WINE (see, for example, http://www.winehq.org).